\section{show --- Display Characteristics}
\label{fn:show}
\index{show()}
\index{display characteristics}
\begin{rail}
Show : 'show' '(' ( Scalar | Matrix | String | List | Function ) ')' ;
\end{rail}

\verb+show+ takes a single argument and returns a brief description
of the argument, containing its class, name, and any other pertinent
characteristics.

All the information provided by show() can be obtained by other
means, such as direct member reference or \verb+class+ and \verb+type+
functions.

The information returned varies according to the argument.  For
scalars, strings and matricies, the result is of the same form.  It is
a five element string row vector with these elements:
\begin{description}
\item{\verb+name+} this is the name of the argument, or \verb+NULL+ if
the argument is unamed.
\item{\verb+class+} this is \verb+num+ for scalars and numeric
matricies, and \verb+string+ for strings and string matricies.
\item{\verb+type+} this is real or complex for scalars and numeric
matricies, and blank for strings and string matricies.
\item{\verb+nr+} this is \verb+1+ for scalars and strings, and the
number of rows if the argument is a matrix.
\item{\verb+nc+} this is \verb+1+ for scalars and strings, and the
number of columns if the argument is a matrix.
\end{description}

For a list, there are three strings in the row vector, consisting of:
\begin{description}
\item{\verb+name+} the name of the list, or \verb+NULL+ if the list is
unnamed.
\item{\verb+class+} this is always \verb+list+.
\item{\verb+n+} this is the number of elements in the list.
\end{description}

There are also three elements to the result of this function with a
function argument. They are:
\begin{description}
\item{\verb+name+} the name of the function.
\item{\verb+class+} this is always \verb+function+.
\item{\verb+type+} this is \verb+user+ for user defined functions, and
\verb+builtin+ for \RLaB\ built in functions.
\end{description}

\paragraph{Example}
\index{example of show()}
\index{show()!example}
\begin{verbatim}
> a = 3.5+2j
 a =
      3.5 + 2i
> show(a)
   name:      a        
   class:     num      
   type:      complex  
     nr:      1        
     nc:      1        
> b = [2,3,4;-5,-6,7]
 b =
        2          3          4  
       -5         -6          7  
> show(b)
   name:      b     
   class:     num   
   type:      real  
     nr:      2     
     nc:      3     
> show("a string")
   name:      NULL    
   class:     string  
    type:     string  
     nr:      1       
     nc:      1       
> c = "another string"
 c =
another string
> show(c)
   name:      c       
   class:     string  
    type:     string  
     nr:      1       
     nc:      1       
> d = <<number=a; mat6=b;c>>
 d =
   3            mat6         number       
> show(d)
   name:      d     
   class:     list  
       n:     3     
> show(sin)
   name:      sin       
   class:     function  
    type:     builtin   
> show(acosh)
   name:      acosh     
   class:     function  
    type:     user      
\end{verbatim}

See also: Page~\pageref{fn:class} \verb+class()+,
Page~\pageref{fn:type} \verb+type()+.

\newpage





